'use strict';

module.exports = app => {
  const { router, controller } = app;

  // 上传文件
  router.post('/api/upload/file', controller.common.upload.cos);
  router.get('/api/file/list', controller.common.file.list);
  router.resources('file', '/api/file', controller.common.file);
  
  // 质检单管理
  router.get('/api/quality-inspection/getQrcode', controller.business.qualityInspection.getQrcode);
  router.resources('qualityInspection', '/api/quality-inspection', controller.business.qualityInspection);
  
  // 车辆管理
  router.resources('car', '/api/car', controller.business.car);

  // 用户管理
  router.post('/api/user/login', controller.business.user.login);
  router.resources('user', '/api/user', controller.business.user);
};
